<?php
namespace Home\Controller;
use Think\Controller;

class CommonController extends Controller {
	protected function _initialize() {
		if(!isset($_SESSION['uid'])){
			redirect(U('Login/index'));
		}
		
		if(!authCheck(MODULE_NAME.'/'.CONTROLLER_NAME.'/'.ACTION_NAME, $_SESSION['uid'])){
			$this->error('没有权限');
		}
	}
}

?>